import React from 'react';
import { BrowserRouter as Router, Route ,Switch} from 'react-router-dom';
import Login from './pages/login/login'
import AdminMain from './pages/admin/adminMain'
import Index from './front/home/index'
import List from './front/list/list'
import Error404 from './pages/error/error404'
import Detail from './front/article/detail'
import Register from './pages/register/register'
export default class App extends React.Component {
  render() {
    return (
      <Router>
        <Switch>
          <Route path='/login' component={Login}></Route>
          <Route path='/index' component={Index}></Route>
          <Route path='/list' component={List}></Route>
          <Route path='/error' component={Error404}></Route>
          <Route path='/detail' component={Detail}></Route>
          <Route path='/register' component={Register}></Route>
          <Route path='/' component={AdminMain}></Route>
        </Switch>
      </Router>
    )
  }
}